home *** CD-ROM | disk | FTP | other *** search
-
- {
- if(true)
- {
- CTCollideHeight = §§newclass(CTCollideHeight,CTCollide);
- }
- }
-
- package Local.Game.Thing
- {
- import Local.Game.World.CPosition;
- import flash.geom.Point;
- import flash.geom.Rectangle;
-
- public class CTCollideHeight extends CTCollide
- {
-
-
- public var mWidth:Number;
-
- public var mHeight:Number;
-
- public function CTCollideHeight(param1:*, param2:Number, param3:Number)
- {
- if(true)
- {
- super(param1);
- if(true)
- {
- mWidth = param2;
- }
- mHeight = param3;
- }
- }
-
- override public function CollideBox(param1:Rectangle) : Boolean
- {
- return false;
- }
-
- override public function CollideRadius(param1:CPosition, param2:Number) : Boolean
- {
- return Point.distance(param1,mPosition) <= param2;
- }
-
- override public function get mMid() : CPosition
- {
- return new CPosition(mPosition.x,mPosition.y - mHeight * 0.5);
- }
-
- override public function get mRect() : Rectangle
- {
- return new Rectangle(mPosition.x - mWidth / 2,mPosition.y - mHeight,mWidth,mHeight);
- }
-
- override public function CollideLine(param1:CPosition, param2:CPosition, param3:Boolean = false) : *
- {
- var _loc4_:* = false;
- var _loc5_:CPosition = null;
- var _loc6_:CPosition = null;
- var _loc7_:* = NaN;
- if(true)
- {
- _loc5_ = (_loc4_ = param1.x > param2.x) ? param2 : param1;
- if(true)
- {
- _loc6_ = _loc4_ ? param1 : param2;
- §§push(mPosition.x >= _loc5_.x);
- if(true)
- {
- if(§§pop())
- {
- if(true)
- {
- §§pop();
- §§push(mPosition.x <= _loc6_.x);
- if(true)
- {
- addr73:
- if(§§pop())
- {
- §§push(mPosition.x - _loc5_.x);
- §§push(_loc6_.x - _loc5_.x);
- if(true)
- {
- §§push(§§pop() / §§pop());
- §§push(_loc6_.y - _loc5_.y);
- if(true)
- {
- §§push(§§pop() * §§pop() + _loc5_.y);
- §§push(§§pop() * §§pop() + _loc5_.y);
- }
- _loc7_ = §§pop();
- §§push(§§pop() <= mPosition.y);
- if(true)
- {
- if(§§pop())
- {
- if(true)
- {
- §§pop();
- addr116:
- §§push(_loc7_ >= mPosition.y - mHeight);
- }
- }
- if(§§pop())
- {
- §§push(param3);
- }
- else
- {
- return param3 ? false : null;
- addr130:
- }
- }
- return !!§§pop() ? true : new CPosition(mPosition.x,_loc7_);
- }
- §§goto(addr116);
- }
- §§goto(addr130);
- }
- §§goto(addr121);
- }
- §§goto(addr130);
- }
- §§goto(addr73);
- }
- §§goto(addr140);
- }
- §§goto(addr40);
- }
- §§goto(addr29);
- }
- }
- }
-